Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Telephony /
Chapter 5 - Telephone Manager Messages / Telephone Manager Message Reference
Telephone Manager Message Functions / Registering Message Handlers


TELCAMsgHand

Registers a call appearance message handler and specifies which messages it should receive.

pascal TELErr TELCAMsgHand (
                     TELDNHandle hTELDN,
                     long eventMask, 
                     TelephoneCAMsgUPP msgProc,
                     long globals);
hTELDN
A handle to the directory number record for the directory number for which you want to receive messages.
eventMask
A long integer that specifies which call appearance messages this message handler should receive. To have your message handler receive a certain message, set a bit to 1. See "Call Appearance Messages" on page 5-14 for a description of the bit masks you can use.
msgProc
A message handler (page 5-59).
globals
A long integer for your use. The Telephone Manager passes this value to your message handler. You can use this value, for example, to access your application's global variables.
function result
A result code. See "Result Codes" on page 5-60 for a list of result codes that the Telephone Manager may return.
DESCRIPTION
The TELCAMsgHand function registers the message handler specified by the msgProc parameter to respond to the call appearance messages issued by the directory number specified by the hTELDN parameter. You specify which messages you want to receive by setting bits in the eventMask parameter.

You can register more than one call appearance message handler. Thus, you can design a message handler to manage a particular feature or a set of related features and screen out unrelated call appearance messages.

Once you register a call appearance message handler, you cannot change the types of messages it is registered to receive. However, you can unregister the message handler by calling the TELClrCAMsgHand function (page 5-55) and then register it again with a new value in the eventMask parameter.

SEE ALSO
To find out which call appearance messages a telephone tool supports, call the TELCAEventsSupp function (page 5-48).

Use the TELTermMsgHand function (page 5-50) to register a handler for terminal messages.

Use the TELDNMsgHand function (page 5-51) to register a handler for directory number messages.

Call the TELClrCAMsgHand function (page 5-55) to remove a call appearance message handler from the Telephone Manager's calling list.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help